<%--
   zTree
   Copyright (c) 2013 ISPERP
   Version : 1.0.0
 --%>
<%@ tag language="java" pageEncoding="UTF-8"
	trimDirectiveWhitespaces="true"%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>


<%@ attribute name="enable" required="false" type="java.lang.Boolean"
	description="设置 zTree 的节点上是否显示 checkbox / radio。默认值: false"%>


<%@ attribute name="autoCheckTrigger" required="false"
	type="java.lang.Boolean"
	description="设置自动关联勾选时是否触发 beforeCheck / onCheck 事件回调函数。"%>


<%@ attribute name="chkboxType" required="false" type="java.lang.String"
	description="勾选 checkbox 对于父子节点的关联关系。[setting.check.enable = true 且 setting.check.chkStyle = 'checkbox' 时生效]。默认值：{'Y': 'ps', 'N': 'ps'}"%>

<%@ attribute name="chkStyle" required="false" type="java.lang.String"
	description="勾选框类型(checkbox 或 radio）[setting.check.enable = true 时生效]。默认值：'checkbox'"%>

<%@ attribute name="nocheckInherit" required="false"
	type="java.lang.Boolean"
	description="当父节点设置 nocheck = true 时，设置子节点是否自动继承 nocheck = true 。[setting.check.enable = true 时生效]。默认值: false"%>

<%@ attribute name="chkDisabledInherit" required="false"
	type="java.lang.Boolean"
	description="当父节点设置 chkDisabled = true 时，设置子节点是否自动继承 chkDisabled = true 。默认值: false"%>

<%@ attribute name="radioType" required="false" type="java.lang.Boolean"
	description="radio 的分组范围。[setting.check.enable = true 且 setting.check.chkStyle = 'radio' 时生效]。默认值：'level'"%>



<c:set var="check" scope="request" value="{'check':'true'" />

<c:if test="${enable eq true}">
	<c:set var="check" value="${check},'enable':true" scope="request" />
</c:if>

<c:if test="${autoCheckTrigger eq true}">
	<c:set var="check" value="${check},'autoCheckTrigger':true"
		scope="request" />
</c:if>

<c:if test="${autoCheckTrigger eq true}">
	<c:set var="check" value="${check},'autoCheckTrigger':true"
		scope="request" />
</c:if>

<c:if test="${not empty chkboxType}">
	<c:set var="check" value="${check},'chkboxType':${chkboxType }"
		scope="request" />
</c:if>


<c:if test="${not empty chkStyle}">
	<c:set var="check" value="${check},'chkStyle':'${chkStyle }'"
		scope="request" />
</c:if>

<c:if test="${nocheckInherit eq true}">
	<c:set var="check" value="${check},'nocheckInherit':true"
		scope="request" />
</c:if>

<c:if test="${chkDisabledInherit eq true}">
	<c:set var="check" value="${check},'chkDisabledInherit':true"
		scope="request" />
</c:if>

<c:if test="${chkDisabledInherit eq true}">
	<c:set var="check" value="${check},'radioType':'${radioType }'"
		scope="request" />
</c:if>

<c:set var="check" scope="request" value="${check}}" />
